﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class BookView : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bindselBookType();
                bindrpBookView();
            }
        }

        /// <summary>
        /// 绑定书籍类别selBookType
        /// </summary>
        private void bindselBookType()
        {
            KCJBSDataContext Db = new KCJBSDataContext();
            selBookType.DataSource = Db.flowManage.Where(W => W.EditorId.Equals("PUB201")).Select(F => F.bookName);
            selBookType.DataBind();
        }


        /// <summary>
        /// 绑定rpBookView数据
        /// </summary>
        private void bindrpBookView()
        {
            KCJBSDataContext Db = new KCJBSDataContext();
            rpBookView.DataSource = Db.flowManage.Where(W => W.EditorId.Equals("PUB201")).Select(F => new { F.bookName, F.EditorId, F.projectNameId });
            rpBookView.DataBind();
        }





    }
}